<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>系统登录</title>
  <link rel="stylesheet" href="../css/login.css">
  <script type="text/javascript" src="../js/jQuery.js"></script>
</head>
<body class="login-bg">

<div class="login">
  <div class="message">系统登录</div>
  <div id="darkbannerwrap"></div>
  <form name="addForm" onsubmit="isLoginRight()" class="layui-form" action="../../user/login" method="post" >
    <input name="username" placeholder="用户名"  type="text" lay-verify="required" class="layui-input" >
    <hr class="hr15">
    <input name="pwd" lay-verify="required" placeholder="密码"  type="password" class="layui-input">
    <hr class="hr15">
      <span><input type="checkbox" value="admin" name="rolename" style="display: inline-block">管理员</span>
      <span><input type="checkbox" value="teacher" name="rolename" style="display: inline-block">讲师登录</span>
    <span><a href="" style="margin-left: 25%">忘记密码?</a></span><span>
    <input value="登录" lay-submit lay-filter="login" style="width:100%;" type="submit">
    <hr class="hr20" >
  </form>
</div>
<script>

   function isLoginRight() {
     if (addForm.username.value == "")
     {
       alert("请填写用户名！");
       addForm.username.focus();
       return false;
     }

     if (addForm.pwd.value == "")
     {
       alert("请填写密码！");
       addForm.username.focus();
       return false;
     }
     return true;
   }

</script>

</body>
</html>